package com.hwp.mybatisplus.controller;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

/**
 * <p>
 * 用户信息表 前端控制器
 * </p>
 *
 * @author hwp
 * @since 2023-02-13
 */
@RestController
@RequestMapping("/user")
public class UserController {
    @GetMapping("hh")
    public String hello(){
        System.out.println("hh");
        return "hh";
    }

    @Autowired
    HttpServletRequest request;

    @GetMapping("hh2")
    public void test2(){
        System.out.println(request.getMethod());
        System.out.println(request.getRequestURI());
        System.out.println(request.getRequestURL());
        System.out.println(request.getLocalAddr());
        System.out.println(request.getPathInfo());
    }

}
